<HTML><HEAD><TITLE>erase_array(++ArraySpec)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Non-logical Variables, Arrays, Bags, Shelves and Stores</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>erase_array(++ArraySpec)</H1>
Erases existing visible array, non-logical variable or reference.
<DL>
<DT><EM>ArraySpec</EM></DT>
<DD>Of the form Atom/Integer or just atom.
</DD>
</DL>
<H2>Description</H2>
   Used to erase the visible array uniquely specified by ArraySpec.
<P>
   Also used to erase the existing non-logical variable or reference ArraySpec.
   ArraySpec is of the form Atom/0, or just Atom.
<P>
   Erasing reclaims the memory occupied by the array or variable.

<H3>Modes and Determinism</H3><UL>
<LI>erase_array(++) is det
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>ArraySpec is not instantiated.
<DT><EM>(5) type error </EM>
<DD>ArraySpec is not an atom or of the form Atom/Integer.
<DT><EM>(41) array or global variable does not exist </EM>
<DD>ArraySpec specifies an array, variable or reference which does not exist.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      local(array(a(4,3))), erase_array(a/2).
      setval(i,1), erase_array(i).
      setval(i,1), erase_array(i/0).

Error:
      erase_array(X).                  (Error 4).
      local(array(a(4,2))),
          erase_array(a(4,2)).         (Error 5).
      erase_array(no_array/1).         (Error 41).
      erase_array(no_array).           (Error 41).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/storage/current_array-2.html">current_array / 2</A>, <A HREF="../../kernel/storage/array-1.html">array / 1</A>, <A HREF="../../kernel/storage/array-2.html">array / 2</A>, <A HREF="../../kernel/storage/variable-1.html">variable / 1</A>, <A HREF="../../kernel/storage/setval-2.html">setval / 2</A>
</BODY></HTML>
